﻿
using Xamarin.Forms;

namespace SharpDepend.XamarinForms
{
    public static class Manager
    {
        public static GraphicsDisplayManager GraphicsDisplayManager { get; private set; }

        public static MultiTouchManager MultiTouchManager { get; private set; }

        /// <summary>
        /// To get dialogs work.
        /// </summary>
        /// <param name="navigationPage">Navigation page</param>
        public static void Init(Page navigationPage)
        {
            SharpDepend.Manager.DialogManager = new DialogManager(navigationPage);
            Init();
        }

        public static void Init()
        {
            SharpDepend.Manager.GraphicsDisplayManager = GraphicsDisplayManager = new GraphicsDisplayManager(SharpDepend.Manager.GraphicsDisplayManager);
            SharpDepend.Manager.MultiTouch = MultiTouchManager = new MultiTouchManager(SharpDepend.Manager.MultiTouch);
            //SharpDepend.Manager.OnedriveManager = new OnedriveManager(null); // Override with XamarinForms classes instead.
        }
    }
}
